com.cete.dynamicpdf
Class ViewerPreferences



Example : This example shows how to change the viewer preferences associated with a document.
    import com.cete.dynamicpdf.*;
 
    public class MyClass {
      public static void main(String args[]) {
        // Create a PDF Document
        Document document = new Document();
        
        // Create a page and add it to the document
        document.getPages().add( new Page( PageSize.LETTER ) );
        
        // Set the viewer preferences
        document.getViewerPreferences().setCenterWindow( true );
        document.getViewerPreferences().setDisplayDocTitle( false );
        document.getViewerPreferences().setHideMenubar( true );
        document.getViewerPreferences().setHideToolbar( true );
        document.getViewerPreferences().setHideWindowUI( true );
        document.getViewerPreferences().setFitWindow(true);
	document.getViewerPreferences().setNoPrintScaling(true);
        
        // Save the PDF document
        document.draw( "[physicalpath]/MyDocument.pdf" );
      }
    }